/*******************************************************************************
 * Copyright (c) 2009 Ordina and committers to Mod4j
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Ordina - initial implementation
 *******************************************************************************/
package org.mod4j.businessdomain.generator.helpers;

import java.util.List;

import com.ldh.mod4j.businessdomain.businessDomainDsl.BusinessClass;
import com.ldh.mod4j.businessdomain.businessDomainDsl.BusinessDomainModel;
import com.ldh.mod4j.businessdomain.businessDomainDsl.Property;
import com.ldh.mod4j.businessdomain.businessDomainDsl.UniqueRule;


public class BusinessDomainModelHelpers {
	/**
	 * get model of business class
	 * 
	 * @param clazz
	 *            : BusinessClass
	 * @return BusienessDomainModel
	 */
	public static BusinessDomainModel getModel(BusinessClass clazz) {
		return (BusinessDomainModel) clazz.eContainer();
	}
	
	/**
	 * get model of Property
	 * 
	 * @param property
	 *            : Property
	 * @return BusienessDomainModel
	 */
	public static BusinessDomainModel getModel(Property property) {
		return (BusinessDomainModel) property.eContainer().eContainer();
	}
}
